import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home.vue'
import Regist from '@/pages/Regist.vue'
import Login from '@/pages/Login.vue'
import New from '@/pages/New.vue'
import Newdaily from '@/pages/Newdaily.vue'
import Myday from '@/pages/Myday.vue'
import Mydays from '@/pages/Mydays.vue'
import Setting from '@/pages/Setting.vue'
import Avatar from '@/pages/Avatar.vue'
import Password from '@/pages/Password.vue'
// 邮件更换密码
import Passs from '@/pages/Passs.vue'
// 更换密码
import Passg from '@/pages/Passg.vue'
import Reply from '@/pages/Reply.vue'
import Replys from '@/pages/Replys.vue'
import Update from '@/pages/Update.vue'
import Fans from '@/pages/Fans.vue'
// 消息
import Words from '@/pages/Words.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    // 注册
    {
      path: '/regist',
      name: 'Regist',
      component: Regist
    },
    // 登录
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    // 写日记
    {
      path: '/new',
      name: 'New',
      component: New
    },
    // 创建日记本
    {
      path: '/new/daily',
      name: 'daily',
      component: Newdaily
    },
    //我的日记
    {
      path: '/new/day/:id',
      name: 'Myday',
      component: Myday
    },
    //我的一个日记本
    {
      path: '/new/day/day/:id',
      name: 'Mydays',
      component: Mydays
    },
    //设置
    {
      path: '/new/setting',
      name: 'Setting',
      component: Setting
    },
    //更换头像
    {
      path: '/new/setting/:id',
      name: 'avatar',
      component: Avatar
    },
    //忘记密码
    {
      path: '/new/password',
      name: 'Password',
      component: Password
    },
    //更换密码
    {
      path: '/new/passg',
      name: 'Passg',
      component: Passg,
    },
     //邮件更换密码
    {
      path: '/users/auth/:code',
      name: 'Passs',
      component: Passs
    },
     //重新编辑页面
    {
      path: '/update/:id',
      name: 'Update',
      component: Update,
    },
     //日记详情
    {
      path: '/reply/:id',
      name: 'Reply',
      component: Reply,
    },
     //回复别人          臻
    {
      path: '/reply/:id/:uid',
      name: 'Replys',
      component: Replys,
    },
     //粉丝
    {
      path: '/fans',
      name: 'Fans',
      component: Fans,
    },
     //消息
    {
      path: '/new/word/word',
      name: 'Words',
      component: Words,
    },
  ]
})
